package com.haier.shell;

import com.haier.crypt.CryptUtils;

import java.io.File;

/**
 * 加壳工具类
 */
public class PackShellUtils {
    private static String SHELL_FILE_NAME = "sdk.zip";

    public static boolean packSdk(String sdkPath, String targetPath) {
        File file = new File(sdkPath);
        if (!file.exists()) return false;
        File resFile = CryptUtils.encryptFile(file, targetPath, SHELL_FILE_NAME, CryptUtils.secretKey);
        if (!resFile.exists()) return false;
        return true;
    }
}
